package cn.com.wms.model;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;

import javax.persistence.Column;
import javax.persistence.Id;

import org.hibernate.internal.util.StringHelper;


public class BaseModel implements Serializable {
	
	/**
	 * List中该记录是第几行
	 */
	private int recordIndex=-1;

	
	private boolean _checked_flag;
	
	/**
	 * 主键
	 */
	private String id;
	
	/**
	 * 创建人
	 */
	private String createdId;
	
	/**
	 * 创建时间
	 */
	private Date createdTime;
	
	/**
	 * 最后更改人
	 */
	private String modifyId;
	
	/**
	 * 最后更改时间
	 */
	private Date modifyTime;
	
	/**
	 * 行数据版本号
	 */
	private Integer verNum;
	
	/**
	 * 删除标志
	 */
	private String delFlag;
	
	private boolean isCheckedFlag=false;
	
	private boolean editFlag=true;
	
	private String commonSortNo;
	private List<SysLogBean> sysLogBean;//历史记录
	private String hisdisplay;//控制历史记录标志显隐

	private String companyType;

	private String flag1;

	private String flag2;

	private String flag3;

	public List<SysLogBean> getSysLogBean() {
		return sysLogBean;
	}

	public void setSysLogBean(List<SysLogBean> sysLogBean) {
		this.sysLogBean = sysLogBean;
	}

	@Column(name = "CREATED_TIME")
	public Date getCreatedTime() {
		return createdTime;
	}

	public void setCreatedTime(Date createdTime) {
		this.createdTime = createdTime;
	}



	@Column(name = "CREATED_ID")
	public String getCreatedId() {
		return createdId;
	}

	public void setCreatedId(String createdId) {
		this.createdId = createdId;
	}

	@Column(name = "MODIFY_ID")
	public String getModifyId() {
		return modifyId;
	}

	public void setModifyId(String modifyId) {
		this.modifyId = modifyId;
	}

	@Column(name = "MODIFY_TIME")
	public Date getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}

	public Integer getVerNum() {
		return verNum;
	}

	public void setVerNum(Integer verNum) {
		this.verNum = verNum;
	}

	public boolean isCheckedFlag() {
		return isCheckedFlag;
	}

	public void setCheckedFlag(boolean isCheckedFlag) {
		this.isCheckedFlag = isCheckedFlag;
	}


	@Column(name = "DELFLAG")
	public String getDelFlag() {
		return delFlag;
	}

	public void setDelFlag(String delFlag) {
		this.delFlag = delFlag;
	}

	@Id
	@Column(name = "id")
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public int getRecordIndex() {
		return recordIndex;
	}

	public void setRecordIndex(int recordIndex) {
		this.recordIndex = recordIndex;
	}

	protected String getItemName(Map<String,String> map,String key) {
		String name="";
		if(StringHelper.isNotEmpty(key)) {
			name= map.get(key);
		}
		return name;
	}

	public boolean isEditFlag() {
		return editFlag;
	}

	public void setEditFlag(boolean editFlag) {
		this.editFlag = editFlag;
	}

	public String getCommonSortNo() {
		return commonSortNo;
	}

	public void setCommonSortNo(String commonSortNo) {
		this.commonSortNo = commonSortNo;
	}

	public boolean is_checked_flag() {
		return _checked_flag;
	}

	public void set_checked_flag(boolean checkedFlag) {
		_checked_flag = checkedFlag;
	}

	public String getHisdisplay() {
		return hisdisplay;
	}

	public void setHisdisplay(String hisdisplay) {
		this.hisdisplay = hisdisplay;
	}

	@Column(name = "COMPANY_TYPE")
	public String getCompanyType() {
		return companyType;
	}

	public void setCompanyType(String companyType) {
		this.companyType = companyType;
	}

	@Column(name = "FLAG1")
	public String getFlag1() {
		return flag1;
	}

	public void setFlag1(String flag1) {
		this.flag1 = flag1;
	}

	@Column(name = "FLAG2")
	public String getFlag2() {
		return flag2;
	}

	public void setFlag2(String flag2) {
		this.flag2 = flag2;
	}

	@Column(name = "FLAG3")
	public String getFlag3() {
		return flag3;
	}

	public void setFlag3(String flag3) {
		this.flag3 = flag3;
	}

	
}
